package com.demo4;

/**
 * Created by Administrator on 2017/3/26.
 */
public class Lei4 {
    public static void main(String[] args) {
        Human zhangsan;
        Human lisi = new Human();
        zhangsan = new Human();
        zhangsan.name = "张三";
        zhangsan.age = 30;
        zhangsan.sex = "男";
        zhangsan.addr = "中国北京";
        lisi = zhangsan;
        System.out.print("张三的姓名: ");
        System.out.println(zhangsan.name);
        System.out.print("李四的姓名: ");
        System.out.println(lisi.name);
        System.out.println("改变李四的名字");
        lisi.name = "李四";
        System.out.print("现在李四的名字为: ");
        System.out.println(lisi.name);
        System.out.print("现在张三的名字为: ");
        System.out.println(zhangsan.name);


    }
}
